package kr.or.javacafe.USCM.USCM108.web;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.multiaction.MultiActionController;

import kr.or.javacafe.USCM.USCM100.web.USCM100Controller;
import kr.or.javacafe.USCM.USCM108.service.USCM108Service;

public class USCM108Controller extends MultiActionController  {
	
	protected final static Log logger = LogFactory.getLog(USCM100Controller.class);
	
	
	private USCM108Service uscm108Service;
		
	public void setUscm108Service(USCM108Service uscm108Service){
		this.uscm108Service = uscm108Service;
	}
	public ModelAndView uscm108Main(HttpServletRequest request, HttpServletResponse response) throws Exception
	{
		ModelAndView returnPage = new ModelAndView("USCM108/uscm108Main");		
		return returnPage;
	}

		
	public ModelAndView findMemberList(HttpServletRequest request, HttpServletResponse response) throws Exception
	{
		if (logger.isDebugEnabled()){ logger.debug("Entering " + getClass() + "." + "ajax_path_normal()"); }
		
		List objList = uscm108Service.findMemberList();
		
		ModelAndView returnPage = new ModelAndView("JSON", "JSON_DATA", objList);	
		returnPage.addObject("objList", objList);
		
		return returnPage;
	}	
}
